package com.ruoyi.repay.controller;

import com.ruoyi.repay.domain.RepaymentSchedule;
import com.ruoyi.repay.domain.vo.ResultVo;
import com.ruoyi.repay.service.RepaymentscheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("repay")
@RestController

public class RepaymentscheduleController {
    @Autowired
    private RepaymentscheduleService repaymentscheduleService;
    //添加还款记录
    @PostMapping("save")
    public ResultVo addrepaymentschedule(@RequestBody RepaymentSchedule repaymentSchedule){
        return repaymentscheduleService.addrepaymentschedule(repaymentSchedule);
    }
//  查询还款记录
    @PostMapping("/repayList")
    public ResultVo repayList(String userInfoCode){
        return repaymentscheduleService.repayList(userInfoCode);
    }

}
